ImpactMojo ImpactMojo
Premium

EDA for Household Survey Data 101

Advanced Visualization, Subgroup Analysis & Comparative Methods
ImpactMojo Workshop Series • Multi-dimensional Survey Data Exploration
75-90 Minutes

Workshop 2: Multi-dimensional Analysis & Visualization

Target Audience: Researchers and analysts ready to move beyond basic descriptive statistics to complex comparative analysis

Prerequisites: Workshop 1 or equivalent experience with survey data EDA

Materials Needed: Computers with advanced data visualization capabilities, multi-round survey data

Learning Objectives

By the end of this workshop, participants will be able to:

Part 1: Advanced Visualization Strategies for Survey Data

25 minutes

The Power of Good Visualization: Two Ways to Show the Same Data

Data: Child malnutrition rates by state from NFHS-5

Approach A - Basic Table:

Stunting Rates by State (%)

Bihar: 42.9%, Uttar Pradesh: 39.7%, Jharkhand: 39.6%...

15 more rows of numbers...

Approach B - Multi-dimensional Visualization:

Heatmap + Small Multiples

Geographic pattern + Rural/Urban split + Wealth quintile breakdown

Immediately shows: North-South divide, urban advantage, wealth gradient

Same data, completely different insights. Visualization is not decoration - it's discovery.

Choosing the Right Visualization for Survey Data

Small Multiples

Best For: Comparing patterns across groups

Use Case: Health outcomes by state and gender

Advantage: Shows both overall pattern and group differences

Code: ggplot2::facet_wrap(), seaborn FacetGrid

Choropleth Maps

Best For: Geographic patterns in survey indicators

Use Case: Literacy rates, health coverage by district

Advantage: Intuitive geographic interpretation

Code: ggplot2 + sf, geopandas + folium

Dot Plots with Confidence Intervals

Best For: Comparing estimates with uncertainty

Use Case: State-level indicators with survey errors

Advantage: Shows precision of estimates

Code: geom_pointrange(), seaborn.barplot(ci=)

Slope Graphs

Best For: Changes between two time points

Use Case: NFHS-4 to NFHS-5 changes by state

Advantage: Highlights individual trajectories

Code: geom_segment() + geom_point()

Heatmaps

Best For: Two-dimensional patterns

Use Case: Age × education fertility patterns

Advantage: Reveals interaction effects

Code: geom_tile(), seaborn.heatmap()

Violin/Box Plots

Best For: Distribution comparisons

Use Case: Income distributions by social group

Advantage: Shows full distribution shape

Code: geom_violin(), seaborn.violinplot()

Survey Visualization Best Practices:

  • Always use sampling weights for population estimates
  • Show confidence intervals or standard errors when possible
  • Include sample sizes in titles or captions
  • Use consistent scales across comparable charts
  • Highlight meaningful differences vs. statistical noise
  • Consider survey design effects in uncertainty estimates

Part 2: Problem Set - Multi-dimensional Subgroup Analysis

30 minutes

Advanced Problem Set: Child Immunization Analysis Across Multiple Dimensions

Research Question: How do childhood immunization rates vary across social groups, geography, and time in India?

Dataset: NFHS-4 and NFHS-5 Children's File

Variables for Analysis:

  • Outcome: h9 (all basic vaccinations by age 12-23 months)
  • Geographic: v024 (state), v025 (urban/rural)
  • Social: v131 (caste/tribe), v190 (wealth quintile)
  • Demographic: v106 (mother's education), b4 (child sex)
  • Temporal: Survey round (NFHS-4 vs NFHS-5)
  • Weights: v005 (women's weight), scaled appropriately

Sample: 150,000 children aged 12-23 months across both surveys

Problem 1: Intersectional Analysis Framework (10 minutes)

Design a systematic subgroup analysis plan:

Dimension Categories Expected Sample Size Minimum for Analysis
Wealth × Caste 5 quintiles × 4 groups = 20 cells ~7,500 per cell 200+ per cell
State × Urban/Rural 28 states × 2 = 56 cells ~2,700 per cell 100+ per cell
Education × Wealth 4 levels × 5 quintiles = 20 cells ~7,500 per cell 200+ per cell
# R code for subgroup analysis with survey weights library(survey) # Set up survey design svydesign <- svydesign(ids = ~v021, strata = ~v023, weights = ~v005, data = data, nest = TRUE) # Calculate weighted proportions by subgroups by_wealth_caste <- svyby(~immunized, ~wealth_quintile + caste, svydesign, svymean, na.rm = TRUE) # Test for significant differences svyttest(immunized ~ urban_rural, svydesign)

Analysis Questions:

  1. Which intersectional groups have <200 observations? How will you handle them?
  2. How would you prioritize subgroup comparisons given multiple testing concerns?
  3. What visualization would best show 3-way interactions (wealth × caste × urban/rural)?
Problem 2: Temporal Change Analysis (10 minutes)

Scenario: Compare immunization improvements from NFHS-4 to NFHS-5 across states

Sample Results:

  • National average: 62% → 76% (+14 percentage points)
  • Top improver: Haryana 56% → 85% (+29 pp)
  • Laggard: Arunachal Pradesh 45% → 48% (+3 pp)
  • High performer: Tamil Nadu 85% → 89% (+4 pp)

Analysis Tasks:

  1. Calculate change scores: Difference and ratio for each state
  2. Identify convergence patterns: Are gaps closing or widening?
  3. Statistical significance: Which changes are meaningful vs. noise?
  4. Outlier detection: Which states show unusual patterns?
# Calculate and visualize temporal changes # NFHS-4 to NFHS-5 comparison with confidence intervals change_data <- data %>% group_by(state, survey_round) %>% summarize( immunized_pct = weighted.mean(immunized, w = weight, na.rm = T), n = n(), se = sqrt(var(immunized, na.rm = T) / n) # Simplified SE ) %>% pivot_wider(names_from = survey_round, values_from = c(immunized_pct, n, se)) %>% mutate( change_pp = immunized_pct_nfhs5 - immunized_pct_nfhs4, change_ratio = immunized_pct_nfhs5 / immunized_pct_nfhs4 )
Problem 3: Inequality Analysis (10 minutes)

Research Question: How has inequality in immunization changed within and between states?

Inequality Measures to Calculate:

  • Concentration Index: Wealth-related inequality within states
  • Between-group variance: Differences across caste/education groups
  • Coefficient of variation: Dispersion across districts/states
  • Ratio measures: Richest/poorest quintile ratios
State Overall Rate Rich-Poor Gap Urban-Rural Gap Inequality Rank
Kerala 89% 5 pp 2 pp 1 (most equal)
Uttar Pradesh 69% 32 pp 18 pp 26 (least equal)
Maharashtra 84% 15 pp 8 pp 12 (moderate)

Interpretation Questions:

  1. Which states achieve high coverage with low inequality?
  2. Is there a trade-off between overall coverage and equity?
  3. How would you prioritize states for targeted interventions?
  4. What additional variables would help explain these patterns?

Part 3: Comparative Analysis Methods

20 minutes

Cross-Sectional vs. Longitudinal Comparison Frameworks

Cross-Sectional Comparisons

What: Compare across groups at one time point

Use For: Understanding current disparities

Methods:

  • Regression decomposition
  • Concentration curves
  • Standardization techniques
  • Multilevel modeling

Cautions:

  • Selection bias in groups
  • Confounding variables
  • Ecological fallacy

Longitudinal Comparisons

What: Compare changes over time

Use For: Understanding trends and policy impacts

Methods:

  • Difference-in-differences
  • Convergence analysis
  • Decomposition of change
  • Cohort analysis

Cautions:

  • Survey design changes
  • Definition modifications
  • External shocks

Systematic Comparison Protocol

6-Step Comparison Framework:

Step 1: Define Comparison Groups

  • Clear inclusion/exclusion criteria
  • Adequate sample sizes
  • Meaningful contrasts

Step 2: Assess Comparability

  • Baseline characteristics balance
  • Survey methodology consistency
  • External validity concerns

Step 3: Choose Appropriate Statistics

  • Means vs. medians for skewed data
  • Absolute vs. relative differences
  • Effect sizes and practical significance

Step 4: Account for Survey Design

  • Sampling weights for population inference
  • Clustering and stratification effects
  • Design-based standard errors

Step 5: Test Statistical Significance

  • Appropriate tests for survey data
  • Multiple comparison adjustments
  • Confidence intervals over p-values

Step 6: Interpret Substantively

  • Practical vs. statistical significance
  • Policy relevance of differences
  • Limitations and caveats

Comparison Design Exercise (12 minutes)

Scenario: Design a comparison to evaluate whether Pradhan Mantri Matru Vandana Yojana (maternity benefit scheme) improved birth outcomes.

Available Data: NFHS-4 (2015-16) and NFHS-5 (2019-21), scheme launched 2017

Your Design Task:

  1. Comparison Strategy: What groups/time periods will you compare?
  2. Outcome Measures: Which birth outcomes are most relevant?
  3. Confounding Control: What other factors changed 2015-2021?
  4. Geographic Variation: How will you handle state-level differences?
  5. Sample Restrictions: Any exclusions needed for valid comparison?

Methodological Questions:

  • How would you distinguish scheme effects from secular trends?
  • What robustness checks would strengthen your analysis?
  • How would you present uncertainty around your estimates?

Part 4: Publication-Ready Visualization Workshop

15 minutes

From EDA to Communication

Visualization Goal EDA Version Publication Version Key Changes
Explore Distributions Quick histogram with default settings Carefully binned histogram with context Optimal bins, reference lines, annotations
Compare Groups Basic box plots by category Box plots with significance tests, sample sizes Statistical annotations, uncertainty
Show Trends Simple line chart over time Multi-series with confidence bands Design effects, confidence intervals
Geographic Patterns Quick choropleth with raw data Weighted estimates with data quality indicators Survey weights, missing data handling

Visualization Makeover Challenge (10 minutes)

Take a basic EDA chart and make it publication-ready following these criteria:

Publication Standards Checklist:

  • Title: Descriptive and specific
  • Data source: Survey name, year, sample size
  • Weights: Population-weighted estimates noted
  • Uncertainty: Confidence intervals or SE shown
  • Missing data: Exclusions documented
  • Sample sizes: Provided for subgroups
  • Significance: Statistical tests results indicated
  • Context: Reference lines, benchmarks
  • Accessibility: Color-blind friendly palette
  • Format: High resolution, proper dimensions

Common EDA → Publication Improvements:

  • From: "Age Distribution" To: "Age Distribution of Women 15-49, NFHS-5 (N=699,686)"
  • From: Default color palette To: Colorbrewer or viridis scales
  • From: Sample percentages To: Weighted population estimates ± 95% CI
  • From: No sample size info To: "Sample sizes: Urban n=235K, Rural n=465K"

Reflection & Advanced Practice

5 minutes

Advanced EDA Skills Assessment

Rate your confidence (1-5) and identify learning priorities:

Skill Area Confidence (1-5) Priority for Development
Multi-dimensional visualization ____ High/Medium/Low
Sampling weights application ____ High/Medium/Low
Subgroup analysis planning ____ High/Medium/Low
Temporal comparison methods ____ High/Medium/Low
Publication-ready visualization ____ High/Medium/Low

Next Learning Goal: What's one advanced EDA technique you want to master in the next month?

Key Takeaway

Advanced EDA is about asking better questions of your data, not just making prettier charts. The goal is to uncover patterns that lead to insights that inform action - always with respect for the complexity and uncertainty inherent in survey data.

Advanced Visualization Resources

Advanced R Packages:

  • ggplot2 extensions: ggridges, ggrepel, gghighlight, patchwork
  • Survey analysis: survey, srvyr, surveytoolbox
  • Interactive viz: plotly, shiny, flexdashboard
  • Publication quality: cowplot, ggpubr, scales

Python Libraries:

  • Advanced plotting: altair, plotnine, bokeh
  • Statistical viz: seaborn, statsmodels
  • Survey analysis: statsmodels.survey, scikit-learn
  • Interactive dashboards: streamlit, dash

Specialized Tools:

  • Stata: Advanced survey commands, graph editor
  • Tableau: Interactive dashboards for survey data
  • D3.js: Custom web visualizations
  • Observable: Collaborative data exploration

Next Steps in ImpactMojo:

  • Bivariate Analysis 101: Relationships and correlations in survey data
  • Multivariate Analysis 101: Advanced modeling with complex survey design
  • Data Feminism 101: Critical approaches to survey data interpretation
  • Visual Ethnography 101: Combining quantitative and qualitative data visualization